﻿
ALTER TABLE [Perf].[Facts]  WITH CHECK ADD  CONSTRAINT [FK_Facts_DeviationPercent] FOREIGN KEY([min_deviation_pct])
REFERENCES [meta].[DeviationPercent] ([deviation_percent_id])
GO

ALTER TABLE [Perf].[Facts] CHECK CONSTRAINT [FK_Facts_DeviationPercent]
GO


GO

ALTER TABLE [Perf].[Facts]  WITH CHECK ADD  CONSTRAINT [FK_Facts_Date] FOREIGN KEY([date_id])
REFERENCES [dbo].[Date] ([date_id])
GO

ALTER TABLE [Perf].[Facts] CHECK CONSTRAINT [FK_Facts_Date]
GO

ALTER TABLE [Perf].[PerfMon]  WITH CHECK ADD  CONSTRAINT [FK_PerfMon_Instance] FOREIGN KEY([instance_id])
REFERENCES [Perf].[Instance] ([instance_id])
GO

ALTER TABLE [Perf].[PerfMon] CHECK CONSTRAINT [FK_PerfMon_Instance]
GO

ALTER TABLE [Perf].[PerfMon]  WITH CHECK ADD  CONSTRAINT [FK_PerfMon_PerfMonCounter] FOREIGN KEY([perfmon_counter_id])
REFERENCES [Perf].[PerfMonCounter] ([perfmon_counter_id])
GO

ALTER TABLE [Perf].[PerfMon] CHECK CONSTRAINT [FK_PerfMon_PerfMonCounter]
GO

ALTER TABLE [Perf].[Facts]  WITH CHECK ADD  CONSTRAINT [FK_Facts_PerfMon] FOREIGN KEY([perfmon_id])
REFERENCES  [Perf].[PerfMon] ([perfmon_id])
GO

ALTER TABLE [Perf].[Facts] CHECK CONSTRAINT [FK_Facts_PerfMon]
GO
